<?php
$T->loadTpl("./html/".$template."/".$qname.".html");
$T->SetTpl('cssjs','html/cssjs.inc'); 
$T->SetTpl('jsmodel','html/jsmodel.inc');     
  
$p=isset($_GET["p"])?$_GET["p"]:"1";
$d_name=isset($_GET["d_name"])?$_GET["d_name"]:"";
$s_where="";
if(!empty($d_name)){
    $s_where=" and grade_name like '%".$d_name."%'";
}
if($p<1)$p=1;
$rc=$T->db->query("select count(*) from sys_grade where xtype='年级' ".$s_where)->fetchColumn(0);
$page=getPageHtml_bt($rc,15,$p,"&t=system_grade&d_name=".$d_name);
$page=mb_convert_encoding($page, 'utf-8', 'utf-8');
$T->Set("dname",$d_name);
$T->Set("page",$page);
$T->SetBlock("list","select a.*,b.name as xdname from sys_grade a left join sys_dict b on a.xid=b.id where xtype='年级' ".$s_where." order by id asc limit ".(($p-1)*15).",15");

include "./comm/ck_btn.php";

$T->Set("template",$template);         
$T->clearNaN();       
$T->clearNoN();
$T->display(); 